







Compares this triple to another triple of the some type. The triples are compared by using the IComparable<T> or IComparable interface on TFirst, TSecond, and TThird. The triples are compared by their first elements first, if their first elements are equal, then they are compared by their second elements. If their second elements are also equal, then they are compared by their third elements.
If TFirst, TSecond, or TThird does not implement IComparable<T> or IComparable, then an NotSupportedException is thrown, because the triples cannot be compared.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
private int IComparable.CompareTo( Object obj ) |
Visual Basic (Declaration) |
---|
Private Function System.IComparable.CompareTo ( _ obj As Object _ ) As Integer Implements IComparable.CompareTo |
Visual C++ |
---|
private: virtual int System.IComparable.CompareTo ( Object^ obj ) sealed = IComparable::CompareTo |
Parameters
- obj
- Object
The triple to compare to.
Return Value
An integer indicating how this triple compares to obj. Less than zero indicates this triple is less than obj. Zero indicate this triple is equals to obj. Greater than zero indicates this triple is greater than obj.
Exceptions
Exception | Condition |
---|---|
System..::ArgumentException | obj is not of the correct type. |
System..::NotSupportedException | Either FirstSecond, TSecond, or TThird is not comparable via the IComparable<T> or IComparable interfaces. |